# !/usr/bin/python
# _*_ coding=utf-8 _*_
# Filename : httplibRequest.py

import httplib
import urllib


httpClient = None

params = urllib.urlencode( { 'name': 'httplib' } )

headers = { 'Content-type':'application/x-www-form-urlencoded', 'Accept':'text/plain', 'Content-Enconding':'gzip' }

httpClient = httplib.HTTPConnection( '192.168.1.55', 80, timeout=5 )
# httpClient = httplib.HTTPSConnection( '192.168.1.55', 443, timeout=5 )
httpClient.request( 'POST', '/test.py', params, headers )

response = httpClient.getresponse()